﻿namespace PowerSong.SongDatabase
    {
    using System.IO;

    public class SubStyleMargin
        {

        public double Left { get; set; }

        public double Top { get; set; }

        public double Right { get; set; }

        public double Bottom { get; set; }

        public SubStyleMargin()
            {
            this.Left = 0;
            this.Top = 0;
            this.Right = 0;
            this.Bottom = 0;
            }

        public SubStyleMargin(double left, double top, double right, double bottom)
            {
            this.Left = left;
            this.Top = top;
            this.Right = right;
            this.Bottom = bottom;
            }

        internal SubStyleMargin(BinaryReader reader)
            {
            this.Left = reader.ReadDouble();
            this.Top = reader.ReadDouble();
            this.Right = reader.ReadDouble();
            this.Bottom = reader.ReadDouble();
            }

        internal void WriteDetails(BinaryWriter writer)
            {
            writer.Write(this.Left);
            writer.Write(this.Top);
            writer.Write(this.Right);
            writer.Write(this.Bottom);
            }

        }

    }
